package com.sc.model.vo;

import java.util.List;

import com.sc.model.Order;
import com.sc.model.ShopCart;

public class OrderVo {

	public final static int ROWS = 5;

	public Order order;
	public List<ShopCart> shopCarts;
	public int page = 0;
	public int pageCount;
	public long rowCount;

	public OrderVo() {
		super();
	}

	public OrderVo(Order order, List<ShopCart> shopCarts) {
		super();
		this.order = order;
		this.shopCarts = shopCarts;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public List<ShopCart> getShopCarts() {
		return shopCarts;
	}

	public void setShopCarts(List<ShopCart> shopCarts) {
		this.shopCarts = shopCarts;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getPageCount() {
		return pageCount;
	}

	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}

	public long getRowCount() {
		return rowCount;
	}

	public void setRowCount(long rowCount) {
		int count = (int) (rowCount / ROWS);
		this.pageCount = rowCount % ROWS == 0 ? count : count + 1;
		this.rowCount = rowCount;
	}

}
